package com.zbkj.crmeb.order.pprocess;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import com.zbkj.crmeb.chant.request.PurchaseProductRequest;
import com.zbkj.crmeb.merchant.api.request.BuyMemberRequest;
import com.zbkj.crmeb.store.model.StoreOrderInfo;
import com.zbkj.crmeb.store.service.StoreOrderInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.constants.Constants;
import com.zbkj.crmeb.finance.model.UserRecharge;
import com.zbkj.crmeb.front.request.OrderCreateRequest;
import com.zbkj.crmeb.front.response.OrderPayResponse;
import com.zbkj.crmeb.store.model.StoreOrder;
import com.zbkj.crmeb.store.request.StoreOrderRefundRequest;
import com.zbkj.crmeb.store.service.StoreOrderService;

/**
 * @ClassName: TmallOrderProcess
 * @Description: 天猫订单
 */
@Service("tmallOrderProcess")
public class TmallOrderProcess extends AbstractOrangePayOrderProcess {

    public static final Logger logger = LoggerFactory.getLogger(TmallOrderProcess.class);

    @Autowired
    private StoreOrderService storeOrderService;

    @Autowired
    private StoreOrderInfoService storeOrderInfoService;

    @Override
    public OrderPayResponse creatPayOrder(String key, OrderCreateRequest orderRequest, String ip) {
        return null;
    }

    @Override
    public HashMap<String, Object> toPayOrder(StoreOrder order, String ip) {
        return null;
    }

    @Override
    public boolean refund(StoreOrderRefundRequest request,StoreOrder storeOrder, StoreOrderInfo storeOrderInfo) {
        //修改订单退款状态
        storeOrderInfo.setRefundStatus(2);
        storeOrderInfo.setStatus(Constants.ORDER_STATUS_H5_REFUNDED);
        storeOrderInfo.setRefundPrice(request.getAmount());
        return storeOrderInfoService.updateById(storeOrderInfo);
    }

    @Override
    public UserRecharge createImgRecharge(BigDecimal price) {
        return null;
    }

    @Override
    public Object buyMember(BuyMemberRequest request) {
        return null;
    }

    @Override
    public Map<String, Object> purchaseProduct(PurchaseProductRequest purchaseProductRequest, String ip) {
        return null;
    }
}
